package com.mk.admin.controller;

import com.mk.admin.model.ResultDto;
import com.mk.admin.model.vo.SymptomVo;
import com.mk.admin.service.SymptomService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/a/adm/symptom")
@Api(tags = "症状列表")
public class SymptomController extends BaseController<SymptomVo> {
    @Autowired
    private SymptomService symptomService;
    @PostMapping("/select")
    @Override
    public ResultDto select(@RequestBody SymptomVo symptomVo) {
        return symptomService.select(symptomVo);
    }
    @PostMapping("/add")
    @Override
    public ResultDto add(@RequestBody SymptomVo symptomVo) {
        return symptomService.add(symptomVo);
    }
    @PostMapping("/update")
    @Override
    public ResultDto update(@RequestBody SymptomVo symptomVo) {
        return symptomService.update(symptomVo);
    }
    @PostMapping("/delete")
    @Override
    public ResultDto delete(@RequestBody SymptomVo symptomVo) {
        return symptomService.delete(symptomVo.getId());
    }

    @PostMapping("/status")
    @Override
    public ResultDto status(@RequestBody SymptomVo symptomVo) {
        return symptomService.status(symptomVo.getId());
    }
}
